<?php

namespace app\model\finance;

use crmeb\basic\BaseModel;
use crmeb\traits\ModelTrait;

class FinanceStatistic extends BaseModel
{
    use ModelTrait;

    /**
     * 数据表主键
     * @var string
     */
    protected $pk = 'id';

    protected $name = 'finance_statistics';

    protected $autoWriteTimestamp = 'int';

    protected $createTime = 'add_time';

    const TRADE_TYPE_ORDER = 1;
    const TRADE_TYPE_AGENT_UP = 2;
    const TRADE_TYPE_AGENT_WITHDRAW = 3;
   const TRADE_TYPE_COMMISSION_WITHDRAW = 4;

   public static $tradeTypeMap = [
       self::TRADE_TYPE_ORDER   =>  '订单收入',
       self::TRADE_TYPE_AGENT_UP    =>  '分销员升级',
       self::TRADE_TYPE_AGENT_WITHDRAW  =>  '分销员提现',
       self::TRADE_TYPE_COMMISSION_WITHDRAW =>  '经销商提现'
   ];

}
